<?php
namespace app\system\controller;
use app\system\controller\SystemController;
/**
 * 系统上传
 */
class SystemUploadController extends SystemController {

	/**
     * AJAX上传文件
     */
    public function index(){
        $return = array('status' => 1, 'info' => '上传成功', 'data' => '');
        $file = target('system/SystemFile');
        $info = $file->uploadData();
        if ($info) {
            $return['data'] = $info;
        } else {
            $return['status'] = 0;
            $return['info'] = $file->getError();
        }
        $this->ajaxReturn($return);
    }

}

